package com.castle.fortress.admin.goods.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
 * 商品表 实体类
 *
 * @author majunjie
 * @since 2021-11-22
 */
@Data
@ApiModel(value = "goods对象", description = "商品表")
public class GoodsDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "唯一主键")
	@JsonProperty("id")
	private Long id;
	@ApiModelProperty(value = "商品名称")
	@JsonProperty("name")
	private String name;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "所属分类")
	@JsonProperty("categoryId")
	private Long categoryId;
	@ApiModelProperty(value = "分类名称")
	@JsonProperty("categoryName")
	private String categoryName;
	@ApiModelProperty(value = "类型")
	@JsonProperty("type")
	private Integer type;
	@ApiModelProperty(value = "排序")
	@JsonProperty("sort")
	private Integer sort;
	@ApiModelProperty(value = "主图片")
	@JsonProperty("thumb")
	private String thumb;
	@ApiModelProperty(value = "主视频")
	@JsonProperty("video")
	private String video;
	@ApiModelProperty(value = "详情信息")
	@JsonProperty("content")
	private String content;
	@ApiModelProperty(value = "条码")
	@JsonProperty("productSn")
	private String productSn;
	@ApiModelProperty(value = "编码")
	@JsonProperty("goodsSn")
	private String goodsSn;
	@ApiModelProperty(value = "原价")
	@JsonProperty("productPrice")
	private String productPrice;
	@ApiModelProperty(value = "现价")
	@JsonProperty("marketPrice")
	private String marketPrice;
	@ApiModelProperty(value = "减库存方式")
	@JsonProperty("totalCnf")
	private String totalCnf;
	@ApiModelProperty(value = "库存")
	@JsonProperty("total")
	private String total;
	@ApiModelProperty(value = "购买赠送积分")
	@JsonProperty("credit")
	private String credit;
	@ApiModelProperty(value = "单次最多购买量")
	@JsonProperty("maxBuy")
	private String maxBuy;
	@ApiModelProperty(value = "用户最多购买量")
	@JsonProperty("userMaxBuy")
	private String userMaxBuy;
	@ApiModelProperty(value = "重量")
	@JsonProperty("weight")
	private String weight;
	@ApiModelProperty(value = "配送方式")
	@JsonProperty("dispatchType")
	private Integer dispatchType;
	@ApiModelProperty(value = "是否为新上")
	@JsonProperty("isNew")
	private Integer isNew;
	@ApiModelProperty(value = "是否为热卖")
	@JsonProperty("isHot")
	private Integer isHot;
	@ApiModelProperty(value = "是否为促销")
	@JsonProperty("isDiscount")
	private Integer isDiscount;
	@ApiModelProperty(value = "是否为推荐")
	@JsonProperty("isRecommand")
	private Integer isRecommand;
	@ApiModelProperty(value = "是否包邮")
	@JsonProperty("isSendFree")
	private Integer isSendFree;
	@ApiModelProperty(value = "运费")
	@JsonProperty("freight")
	private String freight;
	@ApiModelProperty(value = "分享标题")
	@JsonProperty("shareTitle")
	private String shareTitle;
	@ApiModelProperty(value = "分享图标")
	@JsonProperty("shareIcon")
	private String shareIcon;
	@ApiModelProperty(value = "是否参与会员折扣")
	@JsonProperty("isNodisCount")
	private Integer isNodisCount;
	@ApiModelProperty(value = "已售数量")
	@JsonProperty("sales")
	private String sales;
	@ApiModelProperty(value = "是否搜索隐藏")
	@JsonProperty("isSearchShow")
	private Integer isSearchShow;
	@ApiModelProperty(value = "是否启用多规格")
	@JsonProperty("isSpec")
	private Integer isSpec;
	@ApiModelProperty(value = "是否自动上下架")
	@JsonProperty("isAutoShelves")
	private Integer isAutoShelves;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "自动上架时间")
	@JsonProperty("upShelvesDate")
	private Date upShelvesDate;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "自动下架时间")
	@JsonProperty("offShelvesDate")
	private Date offShelvesDate;
	@ApiModelProperty(value = "是否开发票")
	@JsonProperty("isInvoice")
	private Integer isInvoice;
	@ApiModelProperty(value = "标签")
	@JsonProperty("tags")
	private String tags;
	@ApiModelProperty(value = "备注")
	@JsonProperty("remark")
	private String remark;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "创建者")
	@JsonProperty("createUser")
	private Long createUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "创建时间")
	@JsonProperty("createTime")
	private Date createTime;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "更新者")
	@JsonProperty("updateUser")
	private Long updateUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "更新时间")
	@JsonProperty("updateTime")
	private Date updateTime;
	@ApiModelProperty(value = "状态")
	@JsonProperty("status")
	private Integer status;
	@ApiModelProperty(value = "删除状态 YesNoEnum。 yes删除；no未删除")
	@JsonProperty("isDeleted")
	private Integer isDeleted;
	@ApiModelProperty(value = "创建者姓名")
	@JsonProperty("createUserName")
	private String createUserName;
	@ApiModelProperty(value = "图片链接 逗号隔开的多个")
	@JsonProperty("imgUrls")
	private String imgUrls;
	@ApiModelProperty(value = "其他图片列表")
	@JsonProperty("imgList")
	private List<String> imgList;
	@ApiModelProperty(value = "参数列表")
	@JsonProperty("paramsList")
	private List<GoodsParamsDto> paramsList;
	@ApiModelProperty(value = "商品规格列表")
	@JsonProperty("specList")
	private List<GoodsSpecDto> specList;
	@ApiModelProperty(value = "商品规格项目详情列表")
	@JsonProperty("optionList")
	private List<GoodsOptionDto> optionList;

}
